package com.scott.crm.teacher.dao;
import com.scott.crm.clazz.bean.ClazzBean;
import com.scott.crm.clazz.bean.ClazzStudentTeacherBean;
import com.scott.crm.delay.bean.DelayBean;
import com.scott.crm.role.bean.RoleBean;
import com.scott.crm.teacher.bean.TeacherBean;
import com.scott.crm.teacher.dto.MyDto;
import com.scott.crm.user.bean.UserBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;
import java.util.List;

/**
 * @author 袁海华
 * @date 2021/11/23 9:31
 */
@Mapper
public interface TeacherDao extends BaseMapper<TeacherBean>{
    Integer updateClazz(MyDto myDto);
    Integer deleteById(@Param("ids") List<Integer> ids);

    Integer updateTeacherByUserId(TeacherBean  teacherBean);



    /**
     * 方法描述:根据老师ID查看迟到学生情况
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [teacherId]
     * @return:[DelayBean]
     */
    List<DelayBean> findLateStudentInforByTeacherId(Integer teacherId);

    /**
     * 方法描述:根据老师ID查看班级号
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [teacherId]
     * @return:[Integer]
     */
    Integer findClazzIdByTeacherId(Integer teacherId);

    /**
     * 方法描述:根据班级号查看该班级的全部学生
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [clazzId]
     * @return:List<Integer>
     */
    List<Integer> findALLStudentIdByClazzId(Integer clazzId);

    /**
     * 方法描述:根据老师号更新老师资料
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [teacherBean]
     * @return: []
     */
    Integer updateTeacherInforByTeacherId(TeacherBean teacherBean);

    /**
     * 方法描述:根据角色Id查看所有老师
     * @author: 袁海华
     * @date: 2021/11/24 10:45
     * @param:Integer roleId
     * @return:List<Integer>
     */
    List<Integer>findAllTeacherIdByRoleId(Integer roleId);

    /**
     * 方法描述:给老师分配班级
     * @author: 袁海华
     * @date: 2021/11/24 13:41
     * @param:[clazzStudentTeacherBean]
     * @return:[]
     */
    int addClazzByTeacherId(ClazzStudentTeacherBean clazzStudentTeacherBean);

    /**
     * 方法描述:查看老师还未分配班级的老师
     * @author: 袁海华
     * @date: 2021/11/29 9:35
     * @param: [roleBean]
     * @return: [UserBean]
     */


    List<UserBean> findStudentOrTeacherByNotClass(@Param("roleBean") RoleBean roleBean);
    /**
     * 方法描述:查看所有班级
     * @author: 袁海华
     * @date: 2021/11/29 9:35
     * @param: []
     * @return: List<ClazzBean>
     */
    List<ClazzBean> findAllClazz();


    /**
     * 方法描述:根据角色类别查看老师资料
     * @author: 袁海华
     * @date: 2021/11/29 9:34
     * @param: [type]
     * @return: List<MyDto>
     */
    List<MyDto>findTeacherInforByClazzType();

    /**
     * 方法描述:根据李老师ID查看面试问题
     * @author: 袁海华
     * @date: 2021/11/29 9:32
     * @param: TeacherBean teacherBean
     * @return: ArrayList<QuestionEntity>
     */

//    ArrayList<QuestionEntity> findQuestionsByTeacherId(Integer teacherId);

    List<UserBean> findUserByUserBean(UserBean userBean);
    List<Integer> findClazzIdByUserId(UserBean userBean);
    List<Integer> findClazzNameByClazzId(ClazzBean clazzBean);


    List<TeacherBean> findAllTeacher();

    List<TeacherBean> findAllTeacherPage(@Param("begin") Integer begin, @Param("end") Integer end);

    int deleteAssignClazz(@Param("ids") List<Integer> ids);

}
